<template>
	<view>
		<TabBar :activeIndex="1"></TabBar>
		<view class="right-content">
			<view class="tit">
				<u-icon class="back" size="24" name="/static/img/arrow-left.svg" @click="goBack"></u-icon>
			</view>
			<view class="content">
				<!-- <iframe src="/static/hybrid/pdf.html?url=http://101.35.133.21:9009/test.pdf" id="dtdt-map" class="dtdt-map" name="ifr1" scrolling="yes"></iframe> -->
				<web-view :src="links"></web-view>
			</view>
		</view>
    </view>
</template>

<script>
export default {
  data() {
    return {
      links: ""
    };
  },
  methods:{
	  goBack() {
		  console.log("goBack")
	  	uni.navigateBack({
	  		delta: 1
	  	})
	  }
  },
  onLoad(params) {
    let { link } = params;
    link = decodeURIComponent(link);
    this.links = `/static/hybrid/pdf.html?url=${link}`;
	this.id = params.id
	this.$scope.get
	let currentWebview = this.$scope.$getAppWebview(); //获取当前web-view  
	let duration_timeout = setTimeout(function() {  
		let wv = currentWebview.children()[0];  
		console.log(wv);  
		wv.setStyle({  
			//设置web-view距离顶部的距离以及自己的高度，单位为px  
			top: 100,  
			left: 170,  
			width: 1120,  
			height: 670,  
		});  
		clearTimeout(duration_timeout);  
	}, 500);
  },
  onBackPress() {},
};
</script>

<style lang="scss">
	@import "@/static/css/_px2vw.scss";
	.tit{
		width: 100%;
		height: vw(50);
		text-align:center;
		background-color:rgb(64,158,255);
		line-height: vw(50);
		font-size:vw(20);
		color:#FFFFFF;
		font-family:'Arial Negreta', 'Arial Normal', 'Arial', sans-serif;
		font-weight:700;
		font-style:normal;
		.back{
			height: vw(50);
			line-height: vw(50);
			margin-left: vw(15);
			float:left;
		}
	}
	.content{
		height: 80vh;
		uni-web-view {
			margin-top: vw(50);
			margin-left: vw(120);
			height: 80vh;
		}
	}
</style>
